<link rel="stylesheet" href="../addons/jy_merch/css/mobile.css?v=1">
<style>
.fui-block-group {
    border-radius:0.5rem
}
.fui-block-group .fui-block-child {
    background: #fff;
}
.fui-block-group .fui-block-child .icon {height: auto; padding-top: 0.3rem; text-align: center; font-size: 1.3rem;}
.fui-block-group .fui-block-child .icon i { font-size:1.3rem;}
.fui-block-group .fui-block-child .title {
    height: auto;
    font-size: 0.6rem;
    line-height: 1.4
    text-align: center;
    color: #333;
}
</style>
<div class='fui-page fui-page-current'>
	<div ng-if="pagedata.tips" ng-click="access_json('/manage.open/')" class="tips tips-yellow" style="margin:0">
			<i class="fa fa-bullhorn"></i> {{pagedata.tips}}
	</div>
    <div class='fui-content'>
		<div style="background: {{main.syscolor||'#05c175'}};padding:1rem 0.5rem;margin-top:0;padding-bottom:1.6rem;">
			<div class="fui-cellone" style="padding:0">
				<div class="fui-cellone-label" style="width:auto;">
					<img style="border-radius: 0.2rem;width:2.2rem;height:2.2rem" ng-src="{{tomedia(pagedata.item.image) || '../core/resource/images/gw-user.png'}}" />
				</div>
				<div class="fui-cellone-text" style="font-size:0.7rem;color:#fff;padding-left:0.5rem">
					<div style="padding-bottom:0.2rem">
						<span class="bold">{{pagedata.item.title}} </span>
					</div>
					<div ng-if="pagedata.item.busy!=2" class="jylabel jylabel-switch-label">
							<span class="jylabel-switch {{pagedata.item.busy==1?'active':''}}" ng-click="pagedata.item.busy=1;pagedata.getorder();post({'id':pagedata.item.id,'busy':1},'jy_mapfuwu/index/setonline/');">上线</span>
							<span class="jylabel-switch {{pagedata.item.busy==0?'active':''}}" ng-click="pagedata.item.busy=0;post({'id':pagedata.item.id,'busy':0},'jy_mapfuwu/index/setonline/');">离线</span>
					</div>
					<div class="text">{{pagedata.item.desc}}</div>
				</div>
			</div>	
			<div class="fui-icon-group noborder  col-4" style="padding-top:0.5rem">
					<div class="fui-icon-col-sm external" style="margin:0">
							<div>
								<div class="text bold" style="color:#fff;font-size:0.8rem;">{{pagedata.daystatus5 || '0'}}</div>
								<div class="subtitle" style="font-size:0.7rem;color:#fff">成单</div>
							</div>
					</div>
					<div class="fui-icon-col-sm external" style="margin:0">
							<div>
								<div class="text bold" style="color:#fff;font-size:0.8rem;">{{pagedata.daymyfee || '0.00'}}</div>
								<div class="subtitle" style="font-size:0.7rem;color:#fff">今日收入</div>
							</div>
					</div>
					<div class="fui-icon-col-sm external" style="margin:0">
							<div>
								<div class="text bold" style="color:#fff;font-size:0.8rem;">{{pagedata.dayfee || '0.00'}}</div>
								<div class="subtitle" style="font-size:0.7rem;color:#fff">今日单额</div>
							</div>
					</div>
					<div class="fui-icon-col-sm external" style="margin:0">
							<div>
								<div class="text bold" style="color:#fff;font-size:0.8rem;">{{pagedata.allstatus5 || '0'}}</div>
								<div class="subtitle" style="font-size:0.7rem;color:#fff">累积成单</div>
							</div>
					</div>
			</div>			
		</div>
		<div style="padding:0.5rem;margin-top:-2.5rem">
			<div class="fui-cell-group fui-cell-click mod-group radius">
					<a class="fui-cell">
								<div class="fui-cell-icon"><i class="icon icon-caifua"></i></div>
								<div class="fui-cell-text">
									待结算：{{pagedata.clearfee0 || '0.00'}} (平台扣佣：{{pagedata.koufee || '0.00'}})
								</div>
								<div ng-click="access_json('jy_merch/manage.apply_add/')" class="fui-cell-remark noremark">
									<span class="jylabel jylabel-success" style="padding:0.3rem 0.6rem;border-radius:1rem;font-weight:400">结算</span>
								</div>
					</a>
					 <a class="fui-cell" ng-click="access_json('jy_mapfuwu/manage.d_wait/')">
						<div class="fui-cell-icon"><i class="icon icon-position" style="color:#cdab6a;font-size:1rem"></i></div>
						<div class="fui-cell-text">
							<span>我要接单</span>
						</div>
						<div class="fui-cell-remark"></div>
					</a>
			</div>
            <div class="fui-cell-title bold">
                订单管理
            </div>
            <div class="fui-block-group col-3">
                    <a class="fui-block-child" ng-click="access_json('/manage.store_order//status=1')">
                        <div class="icon text-blue">
							<i class="icon icon-daifahuo"></i>
						</div>
                        <div class="title">待接单</div>
						<div class="badge" ng-if="pagedata.status1>0">{{pagedata.allstatus1}}</div>
                    </a>
                
                    <a class="fui-block-child" ng-click="access_json('/manage.store_order//status=2')">
                        <div class="icon text-yellow">
							<i class="icon icon-daifukuan1"></i>
						</div>
                        <div class="title">已接单</div>
						<div class="badge" ng-if="pagedata.ispay>0">{{pagedata.allstatus2}}</div>
                    </a>
               
                    <a class="fui-block-child" ng-click="access_json('/manage.store_order//status=3')">
                        <div class="icon text-orange">
                            <i class="icon icon-daishouhuo1"></i>
                        </div>
                        <div class="title">已完成</div>
                    </a>
                
			</div>
        <div class="fui-cell-title bold">
               网点管理
        </div>
        <div class="fui-block-group col-3">         
                <a class="fui-block-child" ng-click="access_json('/manage.shop/')">
                    <div class="icon text-orange">
                        <i class="icon icon-set"></i>
                    </div>
                    <div class="title">网点设置</div>
                </a>
				<a class="fui-block-child" ng-click="access_json('/manage.apply_list/')">
                    <div class="icon text-orange">
                        <i class="icon icon-quanbudingdan"></i>
                    </div>
                    <div class="title">结算列表</div>
                </a>
        </div>
		<div class="fui-cell-group fui-cell-click mod-group">
					<a class="fui-cell" ng-click="access_json('jy_mapfuwu/message/')">
						<div class="fui-cell-icon"><i class="icon icon-quanbudingdan" style="color:#cdab6a;font-size:1rem"></i></div>
						<div class="fui-cell-text">
							<span>消息管理</span>
						</div>
						<div class="fui-cell-remark"></div>
					</a>
					<a class="fui-cell" ng-click="access_json('jy_mapfuwu/suggest/')">
						<div class="fui-cell-icon"><i class="icon jinyunicon icon-quanbudingdan" style="color:#cdab6a;font-size:1rem"></i></div>
						<div class="fui-cell-text">
							<span>意见反馈</span>
						</div>
						<div class="fui-cell-remark"></div>
					</a>
		</div>
        <div class="fui-title center">更多设置请至PC端后台</div>
		<div class='btn btn-success block btn-submit' href="javascript:" ng-click="access_json('jy_mapfuwu/index/')">返回平台</div>
    </div>
	 </div>
</div>
<div ng-include="sys_html('_shopfooter')"></div>
<audio id="openvoice" controls preload="auto" style="display:none;">
	<source src="../core/resource/images/neworder.mp3"></source>
</audio>
<script>
scope.pagedata.show_verify=function(){
	var url=scope.pagedata.item.url;
	scope.tool.qr(url,'show_verify_ewm',150)
}
scope.pagedata.show_czverify=function(){
	var url=scope.pagedata.item.rechargeurl;
	scope.tool.qr(url,'show_czverify_ewm',150)
}
scope.pagedata.show_payverify=function(){
	var url=scope.pagedata.item.payurl;
	scope.tool.qr(url,'show_payverify_ewm',150)
}	
scope.pagedata.openvoice=function(type){
	var voicetime = 0;
    var openvoice;
	scope.post_json('jy_mapfuwu/manage.shop/openvoice/isopenvoice='+scope.pagedata.isopenvoice,{},function(res){
	});
	if(type==1){
		 openvoice = setInterval(() => {
			if(scope.pagedata.isopenvoice!=1){
				clearInterval(openvoice);
				return false;
			}
			scope.get('jy_mapfuwu/index/getnew/merchid='+scope.pagedata.item.id,function(res){
						console.log('openvoice');console.log(res);
						if(res!='none'){
							voicetime ++;
							$("#openvoice")[0].play();
						}
			});
		}, 5000);
	}
}
</script>